<script setup lang="ts">
import CommonConfig from "./CommonConfig.vue";
import { type FormDesignerComponents } from "../FormComponentMixin";
const config = defineModel<FormDesignerComponents>("config");
</script>

<template>
  <CommonConfig v-model:config="config" />
  <el-form-item label="图标设置">
    <el-radio-group v-model="config.props.icon" size="small">
      <el-radio-button value="StarFilled">
        <el-icon><StarFilled /></el-icon>
      </el-radio-button>
      <el-radio-button value="View">
        <el-icon><View /></el-icon>
      </el-radio-button>
      <el-radio-button value="UserFilled">
        <el-icon><UserFilled /></el-icon>
      </el-radio-button>
      <el-radio-button value="Medal">
        <el-icon><Medal /></el-icon>
      </el-radio-button>
      <el-radio-button value="Sunny">
        <el-icon><Sunny /></el-icon>
      </el-radio-button>
    </el-radio-group>
  </el-form-item>
  <el-form-item label="最大分值">
    <el-input-number v-model="config.props.max" :precision="0" :min="0" :max="20" />
  </el-form-item>
  <el-form-item label="显示分值">
    <el-switch v-model="config.props.showScore" />
  </el-form-item>
  <el-form-item label="允许半分">
    <el-switch v-model="config.props.enableHalf" />
  </el-form-item>
  <el-form-item label="图标颜色">
    <el-color-picker v-model="config.props.color" />
  </el-form-item>
  <el-form-item label="隐藏名称">
    <el-switch v-model="config.props.hideLabel" />
  </el-form-item>
  <el-form-item label="是否必填">
    <el-switch v-model="config.props.required" />
  </el-form-item>
</template>

<style lang="scss" scoped></style>
